:: excute SUBST command under c:
cd /d c:

:: this will set P to something like, D:\svn\, with last slash
SET P=%~DP0

:: this will remove tha last slash from P, i.e D:\svn
SET P=%P:~0,-1%

:: map current folder to virtual driver x:
SUBST X: %P%